﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Candidats.aspx.cs" Inherits="ETestIT.UI.Candidats" Title="Untitled Page" %>

<%@ Register TagPrefix="uc" TagName="CandidateAddEdit" Src="~/AppControls/CandidateAddEdit.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2 id="PageTitle"><%= Title %></h2>
    <asp:LinkButton ID="addNewCandidate" Text="add new" runat="server" OnClick="BtnAddNewCandidate_Clicked" CssClass="linkButton ui-state-default ui-corner-all"/>
    <br/><br/>
    <div>
        <asp:GridView ID="gvCandidats" runat="server" AutoGenerateColumns="False" 
            CssClass="easygrid" onselectedindexchanged="gvCandidats_SelectedIndexChanged" >
            <Columns>
               <asp:TemplateField HeaderText = "Name" ControlStyle-Width="100px">
                    <ItemTemplate>
                        <asp:Label 
                        ID="lblFirstName" 
                        runat="server" 
                        Text='<%# string.Format("{0} {1}", Eval("FirstName"), Eval("Surename")) %>' />
                    </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText = "ProfileTitle" ControlStyle-Width="100px">
                    <ItemTemplate>
                        <asp:Label 
                        ID="lblProfileTitle" 
                        runat="server" 
                        Text='<%# Eval("ProfileTitle.Name") %>' />
                    </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField  HeaderText ="Categories" ControlStyle-Width ="100px">
                    <ItemTemplate>
                        <asp:label
                         ID="lblCategory"
                         runat="server"
                         Text='<%# Eval("Category") %>'/>
                    </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText = "Email" ControlStyle-Width="100px">
                    <ItemTemplate>
                        <asp:Label
                        ID="lblEmail"
                        runat="server"
                        Text='<%# Eval("Email") %>' />
                    </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText = "Phone" ControlStyle-Width="100px">
                    <ItemTemplate>
                        <asp:Label 
                        ID="lblPhone" 
                        runat="server" 
                        Text='<%# Eval("Phone") %>' />
                    </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText = "Resumes">
                    <ItemTemplate>
                        <asp:LinkButton 
                                ID="lbtnCandidateResume" 
                                runat="server" 
                                Text="View"
                                CommandName="ViewCandidateResume" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand="LnkEditCommand" 
                                CssClass="linkButton ui-state-default ui-corner-all"/>
                    </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText = "Actions">
                    <ItemTemplate>
                        <asp:LinkButton 
                                ID="lbtnEditUser" 
                                runat="server" 
                                Text="Edit"
                                CommandName="CandidatsEdit" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand="LnkEditCommand"
                                CssClass="linkButton ui-state-default ui-corner-all" />
                        <asp:LinkButton 
                                ID="lbtnDeleteUser" 
                                runat="server" 
                                Text="Delete"
                                CommandName="CandidatsDelete" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand="LnkEditCommand" 
                                OnClientClick='YesNoDialog(this); return false;' 
                                CssClass="linkButton ui-state-default ui-corner-all" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
 
    <div>
        <br/>
        <br/>
        <uc:CandidateAddEdit runat="server" ID = "candidateAddEdit" Visible="false" />
    </div>
</asp:Content>


